import type { AxiosResponse, AxiosRequestConfig } from 'axios'

export interface HYinterceptors<T = AxiosResponse> {
    requestSuccessFn?: (config: AxiosRequestConfig) => AxiosRequestConfig
    requestFailureFn?: (err: any) => any,
    responseSuccessFn?: (res: T) => T,
    responseFailureFn?: (err: any) => any
}

export interface HYAxiosRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
    interceptors?: HYinterceptors<T>
}